import React from "react";
import ReactDOM from "react-dom/client";
import {AppMenu} from "./AppMenu";
import './index.css';
import {BrowserRouter} from "react-router-dom";
import {initTheme, themeInstance} from "./utils/theme";

const root = ReactDOM.createRoot(document.getElementById('root') as HTMLElement);

(window as any).setTheme = function (isDark: boolean) {
    themeInstance.currentTheme = isDark ? 'dark' : 'light';
}

initTheme();

root.render(
    <React.StrictMode>
        <BrowserRouter>
            <AppMenu/>
        </BrowserRouter>
    </React.StrictMode>
);